//
//  BaseViewController.m
//  Project
//
//  Created by 本游网络 on 2018/1/4.
//  Copyright © 2018年 本游网络. All rights reserved.
//

#import "BaseViewController.h"
#import "UIColor+Extension.h"
#import <IQKeyboardManager/IQKeyboardManager.h>
@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    [IQKeyboardManager sharedManager].shouldResignOnTouchOutside = YES;
}
- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    IQKeyboardManager *keyboardManager = [IQKeyboardManager sharedManager]; // 获取类库的单例变量
    keyboardManager.enable = NO; // 控制整个功能是否启用
    [keyboardManager setEnableAutoToolbar:NO];
    keyboardManager.keyboardDistanceFromTextField = 10.0f; // 输入框距离键盘的距离
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [IQKeyboardManager sharedManager].enable = YES;
}
- (void)leftBarClick{
    [self.navigationController popViewControllerAnimated:YES];
}
@end
